
<!-- saved from url=(0061)https://raw.github.com/ncannasse/hxWiki/master/src/db/User.hx -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">package db;
import sys.db.Types;

@:index(name,unique)
class User extends sys.db.Object {

	public var id : SId;
	public var name : SString&lt;20&gt;;
	public var gid : SInt;
	@:relation(gid)
	public var group : Group;
	public var banEnding : SNull&lt;SDateTime&gt;;

	// prefs
	public var pass : SString&lt;32&gt;;
	public var email : SNull&lt;SString&lt;50&gt;&gt;;
	public var realName : STinyText;

	public function isBanned() {
		return banEnding != null &amp;&amp; banEnding.getTime() &gt; Date.now().getTime();
	}

	public override function toString() {
		return "#"+id+" "+name;
	}

}
</pre></body></html>